#include <cstdio>

bool visit[ 1001 ];
int prime[ 200 ], pcnt;
long long f[ 170 ][ 1001 ], g[ 1001 ];

void init_p( )
{
    int i, j;
    for ( i = 2; i <= 1000; i++ )
        if ( !visit[ i ] )
        {
            prime[ pcnt++ ] = i;
            for ( j = i * 2; j <= 1000; j += i )
                visit[ j ] = 1;
        }
}

void init( )
{
    int i, j, k, p;
    f[ 0 ][ 0 ] = 1;
    for ( i = 1; i <= pcnt; i++ )
        for ( j = 0; j <= 1000; j++ )
        {
            f[ i ][ j ] = f[ i - 1 ][ j ];
            for ( k = prime[ i - 1 ]; k <= j; k *= prime[ i - 1 ] )
                f[ i ][ j ] += f[ i - 1 ][ j - k ];
        }
    for ( i = 0; i <= 1000; i++ )
        for ( j = 0; j <= i; j++ )
            g[ i ] += f[ pcnt ][ j ];
}

int main( )
{
    int n;
    init_p( );
    init( );
    while ( scanf("%d", &n) != EOF )
        printf("%I64d\n", g[ n ]);
    return 0;
}
